Overview
PDF417 barcodes are multi-row and variable-length, which allows for high data capacity and error correction capabilities. The barcode format can encode over 1100 bytes, 1800 text characters or up to 2710 digits. Linear, laser and two-dimensional scanners can read PDF417 barcodes. Additionally, the barcode format supports bidirectional decoding.
Encoding
PDF417 can encode all 128 Standard ASCII values using a three-digit ASCII code, preceded by the character. For example, the carrot symbol ("^") corresponds to ASCII code \094. For a complete list of ASCII values, refer to the ASCII Table.
Structure
It is common for a PDF417 barcode to contain from 3 to 90 rows, which are 90 to 583x in width. Each row is read from left to right, and has the following structure:
- Leading quiet zone.
- Start Pattern.
- Left row indicator symbol character.
- 1 to 30 data symbol characters.
- Right row indicator symbol character.
- Stop pattern.
- Trailing quiet zone.
NOTE: Truncated PDF417 barcodes reduce the stop pattern to a single bar.
Requirements
The symbol characters in a PDF417 barcode are 17-module wide, which consists of 4 bars and 4 spaces. Each bar and space can be from 1 to 6 modules in length. Each set of 929 patterns is a character set, but PDF417 only uses cluster numbers 0, 3 and 6. The symbol characters represent a "codeword" value determined by a number from 0 to 928. Certain codeword values indicate a switch in compaction mode for data encoding. The data encodes in one of the following compaction modes:
- Text Compaction - Encodes alpha -numeric characters and punctuations. (Default)
- Binary Compaction - Encodes all 8-bit characters.
- Numeric Compaction - Encodes all 10 digits for the highest density.
Toolkit automatically encodes the best codeword for the smallest barcode possible, based on the value.
Remarks
A PDF417 barcode has the following adjustable parameters:
- Aspect Ratio.
- Width and Height.
- Error correction level.
Aspect Ratio: The number or rows and columns used change the barcodes aspect ratio. When adjusting the number of rows and columns, the number of symbol characters will remain constant for all rows in a barcode to ensure the barcode retains a rectangular shape. Each row uses character patterns from a single cluster. Any adjacent row must use different clusters in the sequence where the cluster number equals the row number minus 1. Each row must have a left row indicator and a right row indicator. Toolkit calculates the row indicators based on row number, total number of rows, columns, and the error correction level. You can adjust the aspect ratio with the PDFAspectRatio, PDFMaxCols and PDFMaxRows properties.
Width and Height: When printing a PDF417 barcode, it is important to ensure the resolution is as close to the nominal width of the barcode. You will need to scale the bar/space to the exact pixel pitch of the printer. For the best results, the printer resolution should be set higher than 200 dpi. At this resolution, scanners will not have trouble interpreting the difference between two bars with the same width but a different number of pixels.
If you are viewing the barcode on a screen before printing, there are some important considerations. Generally, the barcode image on the screen will be 72 DPI. In this case, it is important to ensure the width and height are multiples of the pixel width. For example, using a 72 DPI resolution, the width of a pixel is 1000 divided by 72, which equals 13.88 pixels. The barcode width and height should be multiples of 13.88 such as 13.88 mils, 27.76 mils or 55.52 mils.
You can adjust the width and height with the PDFModuleHeight and PDFModuleWidth properties.
Error Correction: PDF417 barcodes contain 2 to 512 error correction code words, which correspond to an error correction level. The error correction codeword is calculated based on the Reed Solomon techniques. The number of error correction code words is per level is defined as follows:
- 0 - 2 code words.
- 1 - 4 code words.
- 2 - 8 code words.
- 3 - 16 code words.
- 4 - 32 code words.
- 5 - 64 code words.
- 6 - 128 code words.
- 7 - 256 code words.
- 8 - 512 code words.
- 9 - Automatic error correction based on data encoded.
NOTE: You can specify the error correction level using the PDFSecurityLevel.
|